<?php
require_once(dirname(dirname(__FILE__)) . '/app.php');

need_login();
$userAuth = OauthLimit::getOauthMap($login_user_id);
$defaultShopId = $_REQUEST['shop_id'];
$staffId = $_REQUEST['staff_id'];

if( $_GET['action'] == 'del' ){
	if( $userAuth[84] != null ){
		SalaryMonth::DeleteById($_GET['id'], $login_user_id);
	}
}

$staffList = Staff::GetAllByShop($defaultShopId);

$salaryMonthList = SalaryMonth::GetByStaffId($staffId);




if( $oauthMap[80] == null){
	exit;
}


if( empty( $_GET['id'] ) || (!empty( $_GET['id'] ) && !empty( $_GET['action'] ) ) ){
	
	include template('service/data_manage');
}else{
	$salaryMonth = SalaryMonth::GetById($_GET['id']);
	include template('service/print_data_manage');
}


//include template('service_staff_index');
//include template('subscribe');
